/**
 * 
 */
package server;

import java.io.ByteArrayInputStream;
import java.io.DataInputStream;
import java.io.IOException;

/**
 * @author Yolanda
 *
 */
public class Utility
{
    public static int byte2int(byte[] b) throws IOException
    {
	DataInputStream din = new DataInputStream(new ByteArrayInputStream(b));
	//System.out.println(din.available());	//for test
	int i = din.readInt();
	din.close();
	return i;
    }


    
}
